package com.zyj.java3;

/**
 * @program: JVMDemo
 * @ClassName StringGCTest
 * @author: YaJun
 * @Date: 2021 - 12 - 31 - 10:55
 * @Package: com.zyj.java3
 * @Description: String的垃圾回收
 * -Xms15m -Xmx15m -XX:+PrintStringTableStatistics -XX:PrintGCDetails
 */
public class StringGCTest {

    public static void main(String[] args) {
        for (int i = 0; i < 100000; i++) {
            String.valueOf(i).intern();
        }
    }

}
